home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13898 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: 10 Apr 1996 15:21:58 -0500
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4kh596$ook@solutions.solon.com>
  8. References: <JSA.96Feb16135027@organon.com> <4kcpgkINNcku@keats.ugrad.cs.ubc.ca> <TYNOR.96Apr9105114@twratl.atlanta.twr.com> <4kgunm$o4o@gde.GDEsystems.COM>
  9. Reply-To: seebs@solon.com
  10. NNTP-Posting-Host: solutions.solon.com
  11.  
  12. In article <4kgunm$o4o@gde.GDEsystems.COM>, Chet  <kackman> wrote:
  13.  
  14.     [re: after 'int i, j;', is &i+1 == &j?]
  15.  
  16. >If i = j depends on your unit of address. If i is assumed a longword then
  17.  
  18. >     &i + 4 = &j is true
  19. >     not 
  20. >     &i + 1 = &j
  21.  
  22. This is stupid.
  23.  
  24. A compiler may order the objects in any order it wishes, unless they're in a
  25. struct, in which case they must be in declaration order, but there may be
  26. arbitrary padding if they're in a struct.
  27.  
  28. But the main stupidity here is that, if i is a longword, &i+1 is one longword
  29. "up" from i.
  30.  
  31. Please refrain from correcting my april fools' posting unless you know C,
  32. preferably reasonably well.
  33.  
  34. -s
  35. -- 
  36. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  37. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  38. FUCK the communications decency act.  Goddamned government.  [literally.]
  39. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  40.